<link rel="stylesheet" href="__PUBLIC__/admin/css/bootstrap.css">
<div class="content"> 
                <div class="operation">
                    <div class="pull-left">

                    </div>
                    <div class="right-box">
                        <input type="search" placeholder="搜索..." name="search" class="search" value="{$search}">
                        <span class="glyphicon glyphicon-search" id="sub"></span>
                    </div>
                </div>
                <table class="table">
                    <tbody>
                    <tr>
                        <volist name="header" id="vo">
                            <th>{$vo}
                                <span>
                                    <a class="glyphicon glyphicon-triangle-top"></a>
                                    <a class="glyphicon glyphicon-triangle-bottom"></a>
                                </span>
                            </th>
                        </volist>
                        
                    </tr>
                        <volist name="list" id="vo">
                        <tr>
                            <volist name="vo" id="v">
                                <td>{$v}</td>
                            </volist>
                        </tr>
                        </volist>       
                </tbody>
            </table>
                <div class="page">
                    <span>共 {$count} 条</span>
                    <div class="paging">
                        {$page}
                    </div>
                    前往<input type="text" value="{$p}" name='page' onchange="mychange()">页
                </div>    
            </div>
            <div class="modal fade bs-example-modal-lg">
            <div class="modal-dialog modal-lg">
                <div class="modal-content" style="width: 80%">
                    <h3 style="margin-left:30px">修改FTP信息</h3>
                    <ul class="modal-list" style="width:80%">
                        <li class="row">
                            <label class="col-sm-3">网站域名：</label>
                            <div class="col-sm-9">
                                <input type="password" placeholder="www.bonnidee.cn">
                            </div>
                        </li>
                        <li class="row">
                            <label class="col-sm-3">FTP ip：</label>
                            <div class="col-sm-9">
                                <input type="text" placeholder="127.0.0.1">
                            </div>
                        </li>
                        <li class="row">
                            <label class="col-sm-3">FTP账号：</label>
                            <div class="col-sm-9">
                                <input type="text" placeholder="127.0.0.1">
                            </div>
                        </li>
                        <li class="row">
                            <label class="col-sm-3">FTP密码：</label>
                            <div class="col-sm-9">
                                <input type="email"  placeholder="127.0.0.1">
                            </div>
                        </li>
                        <li class="row">
                            <label class="col-sm-3">后台地址：</label>
                            <div class="col-sm-9">
                                <input type="email"  placeholder="127.0.0.1">
                            </div>
                        </li>
                        <li class="row">
                            <label class="col-sm-3">后台账号：</label>
                            <div class="col-sm-9">
                                <input type="email"  placeholder="127.0.0.1">
                            </div>
                        </li>
                        <li class="row">
                            <label class="col-sm-3">后台密码：</label>
                            <div class="col-sm-9">
                                <input type="email"  placeholder="127.0.0.1">
                            </div>
                        </li>
                        <li class="row">
                            <label class="col-sm-3">备注：</label>
                            <div class="col-sm-9">
                                <input type="email"  placeholder="请输入备注信息" style="height:82px;">
                            </div>
                        </li>       
                    </ul>
                    <div style="text-align: right; margin-bottom: 30px; margin-right: 30px;">
                        <button class="submit-btn" style="width:104px; margin-right: 20px">取消</button>
                        <button class="submit-btn" style="width:104px;">提交</button>
                    </div>
                </div>
            </div>
            </div>
<script type="text/javascript">
    $("#sub").click(function(){
        var search = $('.search').val();
        window.location.href = "/Admin/Audit/index.html?search="+search;
    });

    function mychange(){
      var page =  $('input[name="page"]').val();
      window.location.href = "/index.php/Admin/Audit/index/p/"+page;
    }

    document.onclick = function(e) {
        var modal = 　$('.modal').css('display');
        // console.log(modal);
        if(modal == 'block'){
            $('.modal').css('display','none');
            $(".modal").removeClass("show");
            $("body").removeClass("modal-open");
            $("body").css("padding-right",'0');
            $(".modal-backdrop").remove();
        }　　　　　
    }


    $(".details").click(function(){

        // var id = $(this).attr('id');
        // $.ajax({
        //     url:'/Admin/Audit/edit',    //请求的url地址
        //     dataType: "JSON",   //返回格式为json
        //     async: true,//请求是否异步，默认为异步，这也是ajax重要特性
        //     type: "post",   //请求方式
        //     data:{
        //         id:id,
        //     },

        //     success: function (data) {
        //         if(data.state==1){
        //             // console.log(data.data)
        //             $.each(data.data, function (i, item) {
        //                 // console.log(i);
        //                 $('input[name='+i+']').val(item);
        //             });
        //             console.log(data.value);
        //             $("select[name='admin_id']").find("option[value="+data.value+"]").attr("selected",true);

        //         }else{
        //             console.log(data.data)
        //             return false;
        //         }
        //     }
        // })

        $("body").addClass("modal-open");
        $(".modal").addClass("show");
        $('.modal').css('display','block');
        $('input[name="act"]').val('edit');
        $("body").append("<div class='modal-backdrop fade show'></div>");

    });
    
    $(".modal-content").click(function(event){
        event.stopPropagation();
    });

    $(".details").click(function(event){
        event.stopPropagation();
    });
</script>